import os
from loguru import logger
from datetime import datetime


# 获取当前日期
today_date = datetime.now().strftime('%Y-%m-%d')  # 格式例如：2023-10-15

# 创建以当前日期命名的文件夹
folder_name = f"document/{today_date}"
os.makedirs(folder_name, exist_ok=True)
os.makedirs(folder_name + '/need', exist_ok=True)
os.makedirs(folder_name + '/completed', exist_ok=True)





current_path = os.getcwd()
need_path = current_path + f"\\document\\{today_date}\\need"
completed_path = current_path + f"\\document\\{today_date}\\completed"




logger.remove(handler_id=None)
# 设置日志文件
logger.add(f"logs/{today_date}.log", rotation="100 MB", retention="15 days", level="INFO")




